 <template>
  <div>
    <view-grid ref="grid"
      :columns="columns"
      :detail="detail"
      :editFormFields="editFormFields"
      :editFormFileds="editFormFields"
      :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields"
      :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions"
      :table="table"
      :extend="extend"
      :ck="false">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/V_receip_total.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "收款汇总表",
        name: "V_receip_total",
        url: "/V_receip_total/",
        sortName: "id",
        paginationSize: 99999999,
        paginationHide: true,
      },
      extend: extend,
      editFormFields: {},
      editFormOptions: [],
      searchFormFields: {
        title: "",
        soistatus: "",
        distributorCode: "",
        createDate: "",
        supplierCode: "",
      },
      searchFormOptions: [
        // [
        //   { title: "商品名称", field: "title", type: "like" },
        //   {
        //     dataKey: "order_shop",
        //     data: [],
        //     title: "票状态",
        //     field: "soistatus",
        //     type: "select",
        //   },
        // ],
        [
          // {
          //   dataKey: "distributorList",
          //   data: [],
          //   title: "分销商名称",
          //   field: "distributorCode",
          //   type: "select",
          // },
          { title: "商品名称", field: "title", type: "like" },
          { title: "创建时间", field: "createDate", type: "datetime" },
        ],
        [
          {
            dataKey: "mall_supplier",
            data: [],
            title: "供应商名称",
            field: "supplierCode",
            type: "select",
          },
        ],
      ],
      columns: [
        {
          field: "id",
          title: "主键",
          type: "string",
          width: 90,
          hidden: true,
          require: true,
          align: "left",
        },
        {
          field: "title",
          title: "商品名称",
          type: "string",
          width: 220,
          align: "left",
          sortable: true,
        },
        {
          field: "settlement_price",
          title: "单价",
          type: "decimal",
          width: 90,
          align: "left",
        },
        {
          field: "sumnum",
          title: "购买数量",
          type: "decimal",
          width: 90,
          align: "left",
        },
        {
          field: "payMoney",
          title: "合计金额",
          type: "decimal",
          width: 150,
          align: "left",
        },
        // {
        //   field: "soistatus",
        //   title: "票状态",
        //   type: "int",
        //   bind: { key: "order_shop", data: [] },
        //   width: 90,
        //   align: "left",
        // },
        {
          field: "type",
          title: "产品类型",
          type: "string",
          width: 120,
          require: true,
          align: "left",
          show: true,
        },
        // { field: 'supplierName',
        //   title: '供应商名称',
        //   type: 'string',
        //   width: 120,
        //   align: 'left'
        // },
        {
          field: "swstatus",
          title: "支付状态",
          type: "int",
          bind: { key: "receip_details", data: [] },
          width: 110,
          align: "left",
        },
        {
          field: "supplierName",
          title: "供应商名称",
          type: "string",
          // bind: { key: "mall_supplier", data: [] },
          width: 120,
          align: "left",
        },
        {
          field: "distributorCode",
          title: "分销商名称",
          type: "string",
          bind: { key: "distributorList", data: [] },
          width: 120,
          align: "left",
        },
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
